C# monogodb

55

C# monogodb -

MongoClient dbClient = new MongoClient(<<YOUR ATLAS CONNECTION STRING>>);

var dbList = dbClient.ListDatabases().ToList();

Console.WriteLine("The list of databases on this server is: ");
foreach (var db in dbList)
{
    Console.WriteLine(db);
}

Comments

Submit
0 Comments